<?php
$this->Paginator->options(array('url' => array('controller' => 'listing_tags', 'action' => 'view', 'url_title' => $listingTag["ListingTag"]["url_title"])));
if(!empty($listings)) {
?>
<div class="listings index">
	<h1><?php
		echo htmlspecialchars($listingTag["ListingTag"]["name"]);
	?></h1>
		 <?php echo $listingTag["ListingTag"]["name"]; ?> </br> - онлайн оферти,продукти и фирми предлагащи <?php echo $listingTag["ListingTag"]["name"]; ?>.Бизнес каталог с актуална информация за <?php echo $listingTag["ListingTag"]["name"]; ?>.Сравнете цени и намерете изгодни сделки за <?php echo $listingTag["ListingTag"]["name"]; ?>.Изберете най-евтините и качествени услуги свързани с <?php echo $listingTag["ListingTag"]["name"]; ?>.
	<div class="listings">
		<table cellspacing="0" cellpadding="0" width="100%">
		<?php
		$i = 0;
		foreach ($listings as $listing) {
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td valign="top" style="padding-right: 5px; width: 125px;">
				<div class="preview">
					<img src="http://open.thumbshots.org/image.pxf?url=<?php echo urlencode($listing["Listing"]["url"]); ?>" alt="<?php echo htmlspecialchars($listing["Listing"]["url"]); ?>" />
				</div>
			</td>
			<td valign="top" style="padding-right: 5px;">
				<div class="title">
					<?php echo '<a href="'.SITE_WEBROOT.$listing["Listing"]["url_title"].'-l'.$listing["Listing"]["id"].'.html">'.htmlspecialchars($listing["Listing"]["title"]).'</a>'; ?>
				</div>
				<div class="url"><?php echo htmlspecialchars($listing["Listing"]["url"]); ?></div>
				<br />
				<?php
					echo $htmlToText->html2text($listing["Listing"]["description"], 160, true);
				?>
			</td>
		</tr>
	<?php } ?>
		</table>
	</div>
	
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
<?php
}
?>